package bean;

import com.demo.service.AuthenticationService;
import com.demo.service.FrService;
import com.demo.service.UserService;
import mapper.FrUser;
import mapper.UserBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * User: yuebo
 * Date: 13-9-8
 * Time: 下午3:47
 */
@Component
@Scope("request")
public class StatusBean {
    @Autowired
    private FrService frService;
    private FrUser user;

    public FrService getFrService() {
        return frService;
    }

    public FrUser getUser() {
        return user;
    }

    public void setUser(FrUser user) {
        this.user = user;
    }

    public void setFrService(FrService frService) {
        this.frService = frService;
    }

    public void showStatus(){
        UserBean user=UserService.getLoginUser();
        this.user=frService.findFrUser(user.getId());
    }


}
